﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework.Graphics;

namespace LoA.Shared.Screen {
	public static class SettingValuesGenerator {
		public static List<string> YesNo( ) {
			List<string> values = new List<string>( );
			values.Add("No");
			values.Add("Yes");
			return values;
		}
		public static List<string> Percentage(int min, int max, int step) {
			List<string> values = new List<string>( );
			for (int i = min; i <= max; i += step) {
				values.Add(i.ToString( ) + " %");
			}
			return values;
		}

		public static List<string> Resolutions( ) {
			List<string> values = new List<string>( );
			foreach (var displayMode in GraphicsAdapter.DefaultAdapter.SupportedDisplayModes) {
				var aspect = GraphicMath.AspectRatioNormalize(displayMode.AspectRatio);
				values.Add(displayMode.Width.ToString( ) + " x " + displayMode.Height.ToString( ) + " (" + aspect.X.ToString( ) + "x" + aspect.Y.ToString( ) + ")");
			}
			return values;
		}

		public static List<string> Numeric(int min, int max, int step) {
			List<string> values = new List<string>( );
			for (int i = min; i <= max; i += step) {
				values.Add(i.ToString( ));
			}
			return values;
		}
	}
}
